merge k sorted lists solution